<?php
// $Id: index.php,v 2.10.1 2005/03/25 11:16:00 Yoshi.Sakai Exp $
include '../../../include/cp_header.php';
if(
	(!defined('XOOPS_ROOT_PATH')) || 
	(!is_object($xoopsUser)) || 
	(!$xoopsUser->isAdmin()) ){
	exit();
}
include_once '../conf.php';
require_once XOOPS_ROOT_PATH.'/modules/popnupblog/popnupblog.php';
xoops_cp_header();

include_once './adminmenu.php';

$groupnames = $member_handler->getGroupList(); 
$categories = PopnupBlogUtils::get_categories();
$alias_uid = $sends_uid = 0;
$alias_uname = isset($HTTP_POST_VARS['alias_uname']) ? $HTTP_POST_VARS['alias_uname'] : '';
$sends_uname = isset($HTTP_POST_VARS['sends_uname']) ? $HTTP_POST_VARS['sends_uname'] : '';
$alias_email = isset($HTTP_POST_VARS['alias_email']) ? $HTTP_POST_VARS['alias_email'] : '';
$sends_email = isset($HTTP_POST_VARS['sends_email']) ? $HTTP_POST_VARS['sends_email'] : '';
if ($alias_uname){ $alias_uid = isset($HTTP_POST_VARS['alias_uid']) ? intval($HTTP_POST_VARS['alias_uid']) : 0; }
if ($sends_uname){ $sends_uid = isset($HTTP_POST_VARS['sends_uid']) ? intval($HTTP_POST_VARS['sends_uid']) : 0; }

echo "&nbsp;<br />";

	?>
	<table width='100%' border='0' cellspacing='1' class='outer'>
		<form action="index.php" method="post">
		<tr><td colspan="3" class="head" ><b><?php echo _AM_POPNUPBLOG_ADMIN_CREATE; ?></b></td></tr>
	    <tr class="even">
			<td><?php echo _AM_POPNUPBLOG_ADMIN_UID; ?>(<a href="userList.php" target="_blank"><?php echo _AM_POPNUPBLOG_USER_LIST; ?>)</td>
			<td colspan="2"><input type="text" name="uid" />
		</tr>
		<tr class="odd">
			<td><?php echo _AM_POPNUPBLOG_ADMIN_BLOG_TITLE; ?></td>
			<td colspan="2"><input type='text' name='title'>
			&nbsp;<span class='fg2'><?php echo _AM_CATEGORY;?></span>
			<?php
			if ( $categories ) {
				echo PopnupBlogUtils::mkselect('cat_id',$categories,0);
			} else {
				echo "<select name='cat_id'><option value=\"0\">"._AM_NONE."</option>\n";
			}
			?>
        	</select></td>
		</tr>
		<tr class="even">
			<td><span class='fg2'><?php echo _AM_BLOGDESCRIPTION;?></span></td>
			<td colspan=2><TEXTAREA name='desc' ROWS="3" COLS="45" WRAP="VIRTUAL"></TEXTAREA></td>
		</tr>
		<tr class="odd">
			<td rowspan=4><?php echo _AM_POPNUPBLOG_ADMIN_PERMISSION ?></td>
			<td><?php echo _AM_POPNUPBLOG_ADMIN_PERMISSION0; ?></td><td>
				<input type=radio name=canread value= 7><?php echo _AM_PRIVATE;?></input>
				<input type=radio name=canread value= 6><?php echo _AM_MODERATOR;?></input>
				<input type=radio name=canread value= 1><?php echo _MEMBERS;?></input>
				<input type=radio name=canread value= 0><?php echo _GUESTS;?></input>
			</td></tr>
			<tr class="even"><td><?php echo _AM_POPNUPBLOG_ADMIN_PERMISSION1; ?></td><td>
				<input type=radio name=cancomment value=56><?php echo _AM_PRIVATE;?></input>
				<input type=radio name=cancomment value=48><?php echo _AM_MODERATOR;?></input>
				<input type=radio name=cancomment value= 8><?php echo _MEMBERS;?></input>
				<input type=radio name=cancomment value= 0><?php echo _GUESTS;?></input>
			</td></tr>
			<tr class="even"><td><?php echo _AM_POPNUPBLOG_ADMIN_PERMISSION2; ?></td><td>
				<input type=radio name=canvote value=448><?php echo _AM_PRIVATE;?></input>
				<input type=radio name=canvote value=384><?php echo _AM_MODERATOR;?></input>
				<input type=radio name=canvote value= 64><?php echo _MEMBERS;?></input>
				<input type=radio name=canvote value=  0><?php echo _GUESTS;?></input>
			</td></tr>
		</tr>
		<tr class="even">
			<td><?php echo _AM_POPNUPBLOG_ADMIN_BLOG_EMAIL; ?></td>
			<td colspan="2"><input type='email' name='email'>
		</tr>
		<tr  class="odd">
			<td colspan="3" align="center">
				<input type=submit name=create value=create /></form><br />
			</td>
		</tr>
	</table>
	<br />
<?php
xoops_cp_footer();
?>

